/**
 * Created by Administrator on 2016/5/23 0023.
 */
var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(104.06,30.67), 11);
//mp.centerAndZoom(new BMap.Point(121.491, 31.233), 11);
var local = new BMap.LocalSearch(map, {
    renderOptions:{map: map}
});
local.search("爱美丽");
map.enableScrollWheelZoom(true);

//异步加载
//function initialize() {
//    var mp = new BMap.Map('allmap');
//    mp.centerAndZoom(new BMap.Point(121.491, 31.233), 11);
//}
//
//function loadScript() {
//    var script = document.createElement("script");
//    script.src = "http://api.map.baidu.com/api?v=2.0&ak=xD5MPhQwpHeE8VtCcCx9gWsf4B5nVDAC&callback=initialize";//此为v2.0版本的引用方式
//    // http://api.map.baidu.com/api?v=1.4&ak=您的密钥&callback=initialize"; //此为v1.4版本及以前版本的引用方式
//    document.body.appendChild(script);
//}
//
//window.onload = loadScript;